//
//  Color+Externsions.swift
//  DaRings
//
//  Created by 尹琼 on 2023/2/16.
//

import UIKit
import Hue


// MARK: - 代码使用
public extension UIColor {
    
    /// 通用
    static let theme: UIColor = UI.Main
    static let subTheme: UIColor = UI.Main_assist
    static let background: UIColor = UI.bg_FF
    static let darkBackground: UIColor = UI.bg_F7
    
    static let assist_000000: UIColor = UI.Assist_6_00
    static let assist_222222: UIColor = UI.Assist_1_22
    static let assist_A9A9A9: UIColor = UI.Assist_2_A9
    static let assist_D0D0D0: UIColor = UI.Assist_3_D0
    static let assist_EEEEEE: UIColor = UI.Assist_4_EE
    static let assist_FFFFFF: UIColor = UI.Assist_5_FF
    static let assist_F8F8F8: UIColor = UI.Assist_7_F8
   
    
    struct Step {
        public static let theme: UIColor = UI.Steps
        public static let highlight: UIColor = UI.Step_h
        public static let assist_slider: [UIColor] = UI.Assist_10
    }
    struct BloodOxygen {
        public static let theme: UIColor = UI.Blood_Oxygen
    }
    struct HRV {
        public static let theme: UIColor = UI.HRV
        public static let highlight: UIColor = UI.Heart_Rate_Day_time_h
        public static let assist_slider: [UIColor] = UI.Assist_10
    }
    struct Training {
        public static let theme: UIColor = UI.Popular_workout
        public static let finish: UIColor = UI.Assist_8
    }
    
    struct GPSTraining {
        public static let theme: UIColor = UI.GPS_workout
        
        public static let easyRun: UIColor = UI.GPS_workout_easyRun
        public static let marathon: UIColor = UI.GPS_workout_marathon
        public static let lacticAcid: UIColor = UI.GPS_workout_lacticAcid
        public static let anaerobic: UIColor = UI.GPS_workout_anaerobic
        public static let intervalRun: UIColor = UI.GPS_workout_intervalRun
        public static let finish: UIColor = UI.Assist_8
        
        public static let slow = UI.Assist_8
        public static let fast = intervalRun
        public static let slowToFastState: [UIColor] = UI.GPS_workout_assist_1
        
       
    }
    struct Stress {
        
        public static let theme: UIColor = UI.Stress
        public static let medium: UIColor = UI.Stress_medium
        public static let stressed: UIColor = UI.Stress_stressed
        
        
    }
    
    struct Sleep {
        public static let theme: UIColor = UI.Sleep
        public static let restfulHighlight: UIColor = UI.Sleep_restful_h
        public static let lightHighlight: UIColor = UI.Sleep_light_h
        public static let remHighlight: UIColor = UI.Sleep_rem_h
        public static let awake: UIColor = UI.Sleep_assist_1
        public static let rem: UIColor = UI.Sleep_assist_2
        public static let light: UIColor = UI.Sleep_assist_3
        public static let restful: UIColor = UI.Sleep_assist_4
        
        public static let sleep_gradual_change:[UIColor] = [awake, rem, light, restful]
        public static let assist_charts: [UIColor] = UI.Sleep_assist_5
        public static let assist_slider: [UIColor] = UI.Assist_10
        
        public static let assist_score: [UIColor] = UI.Sleep_assist_8
    }
    
    struct Temperature {
        public static let theme: UIColor = UI.Sleep_assist_7
    }
    
    struct HeartRate {
        public static let theme: UIColor = UI.Heart
        public static let state: [UIColor] = UI.Heart_assist_6
        public static let highlight: UIColor = UI.Heart_Rate_Day_time_h
        public static let sleepHighlight: UIColor = UI.Heart_Rate_sleep_h
        public static let trainingHighlight: UIColor = UI.Heart_Rate_workout_h
        public static let light: UIColor = UI.Heart_assist_1
        public static let weight: UIColor = UI.Heart_assist_2
        public static let aerobic: UIColor = UI.Heart_assist_3
        public static let anaerobic: UIColor = UI.Heart_assist_4
        public static let Vo2Max: UIColor = UI.Heart_assist_5
        public static let gradient: [UIColor] = UI.Sleep_assist_9
        public static let emptyGradient: [UIColor] = UI.Assist_9
        public static let assist_slider: [UIColor] = UI.Assist_10
        
       
    }
    
    
}

// MARK: - 对应UI设计命名
fileprivate extension UIColor {
    
    struct UI {
        internal static let Main: UIColor = UIColor.hex_4C5DF9
        internal static let Main_assist: UIColor = UIColor.hex_FD6464
        internal static let bg_FF: UIColor = UIColor.hex_FFFFFF
        internal static let bg_F7: UIColor = UIColor.hex_F7F7F7
        internal static let Assist_1_22: UIColor = UIColor.hex_222222
        internal static let Assist_2_A9: UIColor = UIColor.hex_A9A9A9
        internal static let Assist_3_D0: UIColor = UIColor.hex_D0D0D0
        internal static let Assist_4_EE: UIColor = UIColor.hex_EEEEEE
        internal static let Assist_5_FF: UIColor = UIColor.hex_FFFFFF
        internal static let Assist_6_00: UIColor = UIColor.hex_000000
        internal static let Assist_7_F8: UIColor = UIColor.hex_F8F8F8
        internal static let Assist_8: UIColor = UIColor.hex_FF525C
        
        internal static let Assist_9: [UIColor] = [.hex_D0D0D0.withAlphaComponent(0.0), .hex_D0D0D0]
        internal static let Assist_10: [UIColor] = [UI.Main.withAlphaComponent(0.01), UI.Main, UI.Main.withAlphaComponent(0.01)]
        
        internal static let Steps: UIColor = UIColor.hex_00D293
        internal static let Step_h: UIColor = UIColor.hex_80E9C9
        internal static let Blood_Oxygen: UIColor = UIColor.hex_FF3333
        internal static let HRV: UIColor = UIColor.hex_FF3333
        internal static let Popular_workout: UIColor = UIColor.hex_FF703F
        internal static let GPS_workout: UIColor = UIColor.hex_FFC44D
        internal static let Stress: UIColor = UIColor.hex_30EAA7
        internal static let Stress_medium: UIColor = UIColor.hex_FFC700
        internal static let Stress_stressed: UIColor = UIColor.hex_FF5C00
        
        // sleep
        internal static let Sleep: UIColor = UIColor.hex_A143FF
        internal static let Sleep_restful_h: UIColor = UIColor.hex_8B6DFF
        internal static let Sleep_light_h: UIColor = UIColor.hex_DD8FF6
        internal static let Sleep_rem_h: UIColor = UIColor.hex_FDAFA0
        internal static let Sleep_assist_1: UIColor = UIColor.hex_FFC634
        internal static let Sleep_assist_2: UIColor = UIColor.hex_FC846D
        internal static let Sleep_assist_3: UIColor = UIColor.hex_CA52F1
        internal static let Sleep_assist_4: UIColor = UIColor.hex_4C1FFF
        
        internal static let Sleep_assist_5: [UIColor] = [.hex_FFD926, .hex_FF8766, .hex_C44DFF, .hex_401AFF]
        internal static let Sleep_assist_7: UIColor = UIColor.hex_4590FF
        internal static let Sleep_assist_8: [UIColor] = [.hex_FFB067, .hex_E86DCB, .hex_9125FD]
        internal static let Sleep_assist_9: [UIColor] = [.hex_FF3333.withAlphaComponent(0.01), .hex_FF3333]
       
        
        // heart
        internal static let Heart: UIColor = UIColor.hex_FF3F3F
        internal static let Heart_Rate_Day_time_h: UIColor = UIColor.hex_FF9F9F
        internal static let Heart_Rate_sleep_h: UIColor = UIColor.hex_D0A1FF
        internal static let Heart_Rate_workout_h: UIColor = UIColor.hex_FFC44D
        internal static let Heart_assist_1: UIColor = UIColor.hex_FFDA31
        internal static let Heart_assist_2: UIColor = UIColor.hex_FFAB08
        internal static let Heart_assist_3: UIColor = UIColor.hex_FF7F14
        internal static let Heart_assist_4: UIColor = UIColor.hex_FF5220
        internal static let Heart_assist_5: UIColor = UIColor.hex_FF2E29
        internal static let Heart_assist_6: [UIColor] = [.hex_FFDF40, .hex_FF3F3F]
        
        internal static let GPS_workout_easyRun: UIColor = UIColor.hex_FF545E
        internal static let GPS_workout_marathon: UIColor = UIColor.hex_FCA685
        internal static let GPS_workout_lacticAcid: UIColor = UIColor.hex_FFDB7D
        internal static let GPS_workout_anaerobic: UIColor = UIColor.hex_D5EEA9
        internal static let GPS_workout_intervalRun: UIColor = UIColor.hex_17E6D3
       
        internal static let GPS_workout_assist_1: [UIColor] = [.hex_FFBCA1, .hex_FF525C, .hex_D5EEA9, .hex_17E6D3]
       
        
    }
    
}

// MARK: - 对应色值命名
fileprivate extension UIColor {
    
    /// common
    static let hex_4C5DF9: UIColor = UIColor(hex: "#4C5DF9")
    static let hex_FD6464: UIColor = UIColor(hex: "#FD6464")
    static let hex_000000: UIColor = UIColor(hex: "#000000")
    static let hex_222222: UIColor = UIColor(hex: "#222222")
    static let hex_A9A9A9: UIColor = UIColor(hex: "#A9A9A9")
    static let hex_D0D0D0: UIColor = UIColor(hex: "#D0D0D0")
    static let hex_EEEEEE: UIColor = UIColor(hex: "#EEEEEE")
    static let hex_FFFFFF: UIColor = UIColor(hex: "#FFFFFF")
    static let hex_F8F8F8: UIColor = UIColor(hex: "#F8F8F8")
    static let hex_F7F7F7: UIColor = UIColor(hex: "#F7F7F7")
    
    static let hex_00D293: UIColor = UIColor(hex: "#00D293")
    static let hex_FF3333: UIColor = UIColor(hex: "#FF3333")
    static let hex_FF703F: UIColor = UIColor(hex: "#FF703F")
    static let hex_FFC44D: UIColor = UIColor(hex: "#FFC44D")
    static let hex_30EAA7: UIColor = UIColor(hex: "#30EAA7")
    static let hex_FFC700: UIColor = UIColor(hex: "#FFC&00")
    static let hex_FF5C00: UIColor = UIColor(hex: "#FF5C00")
    
    // sleep
    static let hex_A143FF: UIColor = UIColor(hex: "#A143FF")
    static let hex_FFC634: UIColor = UIColor(hex: "#FFC634")
    static let hex_FC846D: UIColor = UIColor(hex: "#FC846D")
    static let hex_CA52F1: UIColor = UIColor(hex: "#CA52F1")
    static let hex_4C1FFF: UIColor = UIColor(hex: "#4C1FFF")
    static let hex_FFD926: UIColor = UIColor(hex: "#FFD926")
    static let hex_FF8766: UIColor = UIColor(hex: "#FF8766")
    static let hex_C44DFF: UIColor = UIColor(hex: "#C44DFF")
    static let hex_401AFF: UIColor = UIColor(hex: "#401AFF")
    static let hex_FF0000: UIColor = UIColor(hex: "#FF0000")
    static let hex_FF4040: UIColor = UIColor(hex: "#FF4040")
    
    static let hex_FFB067 = UIColor(hex: "#FFB067")
    static let hex_E86DCB = UIColor(hex: "#E86DCB")
    static let hex_9125FD = UIColor(hex: "#9125FD")
    
    // heart
    static let hex_FF3F3F: UIColor = UIColor(hex: "#FF3F3F")
    static let hex_FFDF40: UIColor = UIColor(hex: "#FFDF40")
    static let hex_FFDA31: UIColor = UIColor(hex: "#FFDA31")
    static let hex_FFAB08: UIColor = UIColor(hex: "#FFAB08")
    static let hex_FF7F14: UIColor = UIColor(hex: "#FF7F14")
    static let hex_FF5220: UIColor = UIColor(hex: "#FF5220")
    static let hex_FF2E29: UIColor = UIColor(hex: "#FF2E29")
    
    static let hex_80E9C9: UIColor = UIColor(hex: "#80E9C9")
    static let hex_FF9F9F: UIColor = UIColor(hex: "#FF9F9F")
    static let hex_D0A1FF: UIColor = UIColor(hex: "#D0A1FF")
    static let hex_8B6DFF: UIColor = UIColor(hex: "#8B6DFF")
    static let hex_DD8FF6: UIColor = UIColor(hex: "#DD8FF6")
    static let hex_FDAFA0: UIColor = UIColor(hex: "#FDAFA0")
    
    static let hex_FF545E: UIColor = UIColor(hex: "#FF545E")
    static let hex_FCA685: UIColor = UIColor(hex: "#FCA685")
    static let hex_FFDB7D: UIColor = UIColor(hex: "#FFDB7D")
    static let hex_D5EEA9: UIColor = UIColor(hex: "#D5EEA9")
    static let hex_17E6D3: UIColor = UIColor(hex: "#17E6D3")
    
    static let hex_4590FF: UIColor = UIColor(hex: "#4590FF")
    
    static let hex_FF525C: UIColor = UIColor(hex: "#FF525C")
    static let hex_FFBCA1: UIColor = UIColor(hex: "#FFBCA1")
   

}

